Form1 PSETUP.DLL DEMO Form1 FileMNU &File PSetupMNU Printer &Setup ExitMNU E&xit GetProfileString Keyname DefaultVal RetBuf DoPrinterSetup DriverName PortName PSetupMNU_Click RetStr Form1 ExitMNU_Click FileMNU_ClickY Form_Click flase false RetStrSize We use GetProfileString to retrieve the current Printer Driver's Name and output port (e.g. LPT1:) KERNELn PSETUP.DLL has only one function: DoPrinterSetup which invokes the Windows 3.0 standard Printer Setup Dialog. It expects three parameters: the calling form's hWnd handle, the name of the printer driver, and the ouptut port. The function returns true if the Printer Setup dialog was implemented and false if it wasn't, but in most cases you won't need to check the return value. m PSETUP.DLL PSetupMNU_Click Prepare a long enough ASCIIZ Return Bufferr The info we need is in the [windows] section, under "device"t windows" device Parse the RetStr$ to the components that interest us. Call DoPrinterSetup sending it the Form's handle, the printer driver name, and port. Note: Do not add the extension "drv" to DriverName$. PSETUP.DLL does it for you.o Can't run Printer Setup" Please check your installation Printer Setup" ExitMNU_Click